import torch

lib_path = r"/root/test/build/libtest-libtorch.so"
torch.ops.load_library(lib_path)


def test_add():
    a = torch.rand([10, 10, 3])
    b = torch.rand([10, 10, 3])
    c = torch.ops.my_ops.my_add(a, b)
    d = a + b
    assert torch.allclose(c, d)
test_add()